package com.example.demo.controller;

import com.example.demo.service.StudentService;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController2 {
//    // 注入方法2 构造方法
//    private UserService userService;
//    private StudentService studentService;
//
//    public UserController2(){
//
//    }
//
//
//
//    public UserController2(UserService userService){
//        this.userService=userService;
//    }
//
//    @Autowired
//    public UserController2(UserService userService, StudentService studentService) {
//        this.userService = userService;
//        this.studentService = studentService;
//    }
//
//    public void say(){
//        System.out.println("this is UserController2");
//        userService.say();
//    }
}
